(* =============================================== *)
(* lexer pour l'analyse lexicale du code net_list  *)
(* author Mathieu Barbin, Ocan Sankur              *)
(* version samedi 17 novembre 2007                 *)
(* =============================================== *)

{ 
  open ParserSSA
  open Bopprocesstools
}

rule lexem_list = parse
  | (['/'] ['/'] [^'\n']* ['\n'])                { incr(index_ligne_net_list); 
						   lexem_list lexbuf }
  | ['\n']                                       { incr(index_ligne_net_list); NL }
  | [' ' '\t'] +                                 { lexem_list lexbuf }
  | "input"                                      { INPUT }
  | "output"                                     { OUTPUT }
  | (['0'-'9']+) as entier                       { INT (int_of_string entier) }
  | ","                                          { VIRG }
  | "="                                          { EGAL }
  | "<-"                                         { EGAL }
  | (['A'-'Z' 'a'-'z' '0'-'9' '_' '\'' '~' '+' '-' '\\' '/' '^' '&' '|' '<' '>' '=' ';' ':' '!' '?' '!' '[' ']' '_']* )
      as name                                    { IDENT name }
  | eof                                          { EOF }
      
